digits = [9,9,9]
def plusOne(digits):
    digitsLen=len(digits)
    num=0
    base=0
    for i in range(digitsLen):
        num+=digits[digitsLen-i-1]*pow(10,base)
        base+=1
    num+=1
    ans=[]
    while num>0:
        ans.append(num%10)
        num//=10
    ans.reverse()
    return ans

print(plusOne(digits))
